﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MVP;

namespace WinForms
{
    public partial class Profil : Form, IProfilView
    {
        private ProfilPresenter _presenter;
        public Profil()
        {
            _presenter = new ProfilPresenter(this);
            InitializeComponent();
            Initialize(this, new EventArgs());
        }

        #region IProfilView Members

        public string Yayasan
        {
            get
            {
                return NamaYayasanTextBox.Text;
            }
            set
            {
                NamaYayasanTextBox.Text = value;
            }
        }

        public string KetuaYayasan
        {
            get
            {
                return KetuaYayasanTextBox.Text;
            }
            set
            {
                KetuaYayasanTextBox.Text = value;
            }
        }

        public string Sekolah
        {
            get
            {
                return NamaSekolahTextBox.Text;
            }
            set
            {
                NamaSekolahTextBox.Text = value;
            }
        }

        public string KepalaSekolah
        {
            get
            {
                return KepalaSekolahTextBox.Text;
            }
            set
            {
                KepalaSekolahTextBox.Text = value;
            }
        }

        public string BendaharaSekolah
        {
            get
            {
                return BendaharaTextBox.Text;
            }
            set
            {
                BendaharaTextBox.Text = value;
            }
        }

        public DataSet LppbopDataSet
        {
            set { throw new NotImplementedException(); }
        }

        public void SendMessageInfo(string strMessage)
        {
            MessageBox.Show(strMessage, "Information Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }

        public event EventHandler Save;

        public event EventHandler Initialize;

        #endregion IProfilView Members

        private void simpanButton_Click(object sender, EventArgs e)
        {
            Save(sender, e);
            this.Dispose();
            this.Close();
        }

        private void keluarButton_Click(object sender, EventArgs e)
        {
            this.Dispose();
            this.Close();
        }
    }
}